package com.visizen.wisdomclass.server.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class WcTermExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public WcTermExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andIDIsNull() {
            addCriterion("ID is null");
            return (Criteria) this;
        }

        public Criteria andIDIsNotNull() {
            addCriterion("ID is not null");
            return (Criteria) this;
        }

        public Criteria andIDEqualTo(Long value) {
            addCriterion("ID =", value, "ID");
            return (Criteria) this;
        }

        public Criteria andIDNotEqualTo(Long value) {
            addCriterion("ID <>", value, "ID");
            return (Criteria) this;
        }

        public Criteria andIDGreaterThan(Long value) {
            addCriterion("ID >", value, "ID");
            return (Criteria) this;
        }

        public Criteria andIDGreaterThanOrEqualTo(Long value) {
            addCriterion("ID >=", value, "ID");
            return (Criteria) this;
        }

        public Criteria andIDLessThan(Long value) {
            addCriterion("ID <", value, "ID");
            return (Criteria) this;
        }

        public Criteria andIDLessThanOrEqualTo(Long value) {
            addCriterion("ID <=", value, "ID");
            return (Criteria) this;
        }

        public Criteria andIDIn(List<Long> values) {
            addCriterion("ID in", values, "ID");
            return (Criteria) this;
        }

        public Criteria andIDNotIn(List<Long> values) {
            addCriterion("ID not in", values, "ID");
            return (Criteria) this;
        }

        public Criteria andIDBetween(Long value1, Long value2) {
            addCriterion("ID between", value1, value2, "ID");
            return (Criteria) this;
        }

        public Criteria andIDNotBetween(Long value1, Long value2) {
            addCriterion("ID not between", value1, value2, "ID");
            return (Criteria) this;
        }

        public Criteria andTERM_IDIsNull() {
            addCriterion("TERM_ID is null");
            return (Criteria) this;
        }

        public Criteria andTERM_IDIsNotNull() {
            addCriterion("TERM_ID is not null");
            return (Criteria) this;
        }

        public Criteria andTERM_IDEqualTo(Long value) {
            addCriterion("TERM_ID =", value, "TERM_ID");
            return (Criteria) this;
        }

        public Criteria andTERM_IDNotEqualTo(Long value) {
            addCriterion("TERM_ID <>", value, "TERM_ID");
            return (Criteria) this;
        }

        public Criteria andTERM_IDGreaterThan(Long value) {
            addCriterion("TERM_ID >", value, "TERM_ID");
            return (Criteria) this;
        }

        public Criteria andTERM_IDGreaterThanOrEqualTo(Long value) {
            addCriterion("TERM_ID >=", value, "TERM_ID");
            return (Criteria) this;
        }

        public Criteria andTERM_IDLessThan(Long value) {
            addCriterion("TERM_ID <", value, "TERM_ID");
            return (Criteria) this;
        }

        public Criteria andTERM_IDLessThanOrEqualTo(Long value) {
            addCriterion("TERM_ID <=", value, "TERM_ID");
            return (Criteria) this;
        }

        public Criteria andTERM_IDIn(List<Long> values) {
            addCriterion("TERM_ID in", values, "TERM_ID");
            return (Criteria) this;
        }

        public Criteria andTERM_IDNotIn(List<Long> values) {
            addCriterion("TERM_ID not in", values, "TERM_ID");
            return (Criteria) this;
        }

        public Criteria andTERM_IDBetween(Long value1, Long value2) {
            addCriterion("TERM_ID between", value1, value2, "TERM_ID");
            return (Criteria) this;
        }

        public Criteria andTERM_IDNotBetween(Long value1, Long value2) {
            addCriterion("TERM_ID not between", value1, value2, "TERM_ID");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDIsNull() {
            addCriterion("GROUP_ID is null");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDIsNotNull() {
            addCriterion("GROUP_ID is not null");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDEqualTo(Long value) {
            addCriterion("GROUP_ID =", value, "GROUP_ID");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDNotEqualTo(Long value) {
            addCriterion("GROUP_ID <>", value, "GROUP_ID");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDGreaterThan(Long value) {
            addCriterion("GROUP_ID >", value, "GROUP_ID");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDGreaterThanOrEqualTo(Long value) {
            addCriterion("GROUP_ID >=", value, "GROUP_ID");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDLessThan(Long value) {
            addCriterion("GROUP_ID <", value, "GROUP_ID");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDLessThanOrEqualTo(Long value) {
            addCriterion("GROUP_ID <=", value, "GROUP_ID");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDIn(List<Long> values) {
            addCriterion("GROUP_ID in", values, "GROUP_ID");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDNotIn(List<Long> values) {
            addCriterion("GROUP_ID not in", values, "GROUP_ID");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDBetween(Long value1, Long value2) {
            addCriterion("GROUP_ID between", value1, value2, "GROUP_ID");
            return (Criteria) this;
        }

        public Criteria andGROUP_IDNotBetween(Long value1, Long value2) {
            addCriterion("GROUP_ID not between", value1, value2, "GROUP_ID");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMEIsNull() {
            addCriterion("TERM_NAME is null");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMEIsNotNull() {
            addCriterion("TERM_NAME is not null");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMEEqualTo(String value) {
            addCriterion("TERM_NAME =", value, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMENotEqualTo(String value) {
            addCriterion("TERM_NAME <>", value, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMEGreaterThan(String value) {
            addCriterion("TERM_NAME >", value, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMEGreaterThanOrEqualTo(String value) {
            addCriterion("TERM_NAME >=", value, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMELessThan(String value) {
            addCriterion("TERM_NAME <", value, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMELessThanOrEqualTo(String value) {
            addCriterion("TERM_NAME <=", value, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMELike(String value) {
            addCriterion("TERM_NAME like", value, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMENotLike(String value) {
            addCriterion("TERM_NAME not like", value, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMEIn(List<String> values) {
            addCriterion("TERM_NAME in", values, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMENotIn(List<String> values) {
            addCriterion("TERM_NAME not in", values, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMEBetween(String value1, String value2) {
            addCriterion("TERM_NAME between", value1, value2, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andTERM_NAMENotBetween(String value1, String value2) {
            addCriterion("TERM_NAME not between", value1, value2, "TERM_NAME");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMEIsNull() {
            addCriterion("BEGIN_TIME is null");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMEIsNotNull() {
            addCriterion("BEGIN_TIME is not null");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMEEqualTo(Date value) {
            addCriterionForJDBCDate("BEGIN_TIME =", value, "BEGIN_TIME");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMENotEqualTo(Date value) {
            addCriterionForJDBCDate("BEGIN_TIME <>", value, "BEGIN_TIME");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMEGreaterThan(Date value) {
            addCriterionForJDBCDate("BEGIN_TIME >", value, "BEGIN_TIME");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMEGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("BEGIN_TIME >=", value, "BEGIN_TIME");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMELessThan(Date value) {
            addCriterionForJDBCDate("BEGIN_TIME <", value, "BEGIN_TIME");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMELessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("BEGIN_TIME <=", value, "BEGIN_TIME");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMEIn(List<Date> values) {
            addCriterionForJDBCDate("BEGIN_TIME in", values, "BEGIN_TIME");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMENotIn(List<Date> values) {
            addCriterionForJDBCDate("BEGIN_TIME not in", values, "BEGIN_TIME");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMEBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("BEGIN_TIME between", value1, value2, "BEGIN_TIME");
            return (Criteria) this;
        }

        public Criteria andBEGIN_TIMENotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("BEGIN_TIME not between", value1, value2, "BEGIN_TIME");
            return (Criteria) this;
        }

        public Criteria andEND_TIMEIsNull() {
            addCriterion("END_TIME is null");
            return (Criteria) this;
        }

        public Criteria andEND_TIMEIsNotNull() {
            addCriterion("END_TIME is not null");
            return (Criteria) this;
        }

        public Criteria andEND_TIMEEqualTo(Date value) {
            addCriterionForJDBCDate("END_TIME =", value, "END_TIME");
            return (Criteria) this;
        }

        public Criteria andEND_TIMENotEqualTo(Date value) {
            addCriterionForJDBCDate("END_TIME <>", value, "END_TIME");
            return (Criteria) this;
        }

        public Criteria andEND_TIMEGreaterThan(Date value) {
            addCriterionForJDBCDate("END_TIME >", value, "END_TIME");
            return (Criteria) this;
        }

        public Criteria andEND_TIMEGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("END_TIME >=", value, "END_TIME");
            return (Criteria) this;
        }

        public Criteria andEND_TIMELessThan(Date value) {
            addCriterionForJDBCDate("END_TIME <", value, "END_TIME");
            return (Criteria) this;
        }

        public Criteria andEND_TIMELessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("END_TIME <=", value, "END_TIME");
            return (Criteria) this;
        }

        public Criteria andEND_TIMEIn(List<Date> values) {
            addCriterionForJDBCDate("END_TIME in", values, "END_TIME");
            return (Criteria) this;
        }

        public Criteria andEND_TIMENotIn(List<Date> values) {
            addCriterionForJDBCDate("END_TIME not in", values, "END_TIME");
            return (Criteria) this;
        }

        public Criteria andEND_TIMEBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("END_TIME between", value1, value2, "END_TIME");
            return (Criteria) this;
        }

        public Criteria andEND_TIMENotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("END_TIME not between", value1, value2, "END_TIME");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}